// setTimeout(function(){
//     var a = 'hello'
//     setTimeout(function(){
//         var b = 'lagou'
//         setTimeout(function(){
//             var c = 'I*U'
//             console.log(a + b + c)
//         },10)
//     },10)
// },10)

//用promise改写
new Promise(resolve => {
    setTimeout(function(){
        var a = 'hello'
        resolve(a)
    },10)
}).then(val => {
    return new Promise(resolve => {
        setTimeout(function(){
            var b = 'lagou'
            resolve(val+b)
        },10)
    })
}).then(val => {
    return new Promise(resolve => {
        setTimeout(function(){
            var c = 'I*U'
            resolve(val+c)
        },10)
    })
}).then(val => {
    console.log(val)
})

